package irri.soils.ssnm;

import java.util.ArrayList;
import java.util.Iterator;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.EditText;

public class NoImeEditText extends EditText {
	  ArrayList<View> views = new ArrayList<View>(); 
	
	  public NoImeEditText(Context context, AttributeSet attrs) { 
		  super(context, attrs);     
	  }    

	  @Override      
	  public boolean onCheckIsTextEditor() {   
		  if(views!=null){
		  Iterator<View> it = views.iterator();
		  while(it.hasNext()){
			  View v = (View) it.next();
			  v.setVisibility(hasFocus() ? View.GONE : 
				  View.VISIBLE);
		  }
		  }
		  return false;     
	  }
	  
	  public void toHide(View v){
		  views.add(v);
	  }
} 